package com.attack.interfacesantiattack.controller;

import com.alibaba.fastjson2.JSONObject;
import com.attack.interfacesantiattack.annotation.Anti;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AntiController {

    @GetMapping("/anti")
    @Anti
    public JSONObject anti() {
        JSONObject jsonObject = new JSONObject() {{
            put("code", "500");
            put("msg", "操作失败");
        }};

        return jsonObject;
    }
}
